package com.emser.unc.client.event;

import com.emser.unc.client.service.CustomerServiceAsync;
import com.emser.unc.serializable.CustomerDTO;
import com.google.gwt.event.shared.GwtEvent;

public class EditCustomerEvent extends GwtEvent<EditCustomerEventHandler> {
public static Type<EditCustomerEventHandler> TYPE = new Type<EditCustomerEventHandler>();
	private CustomerDTO customer;
	private CustomerServiceAsync customerServiceAsync;
	@Override
	public com.google.gwt.event.shared.GwtEvent.Type<EditCustomerEventHandler> getAssociatedType() {
		return TYPE;
	}
	public EditCustomerEvent(CustomerDTO customer,CustomerServiceAsync customerServiceAsync) {
	    this.customer = customer;
	    this.customerServiceAsync =customerServiceAsync;
	  }
	
	@Override
	protected void dispatch(EditCustomerEventHandler handler) {
		handler.onEdit(this);
		
	}
	public EditCustomerEvent(CustomerDTO customer) {
	    this.customer = customer;
	  }

	  public CustomerDTO getCustomer() {
	    return customer;
	  }
	  public CustomerServiceAsync getRPCserviceCustomer(){
			return customerServiceAsync;	
		}
}
